home *** CD-ROM | disk | FTP | other *** search
-
-
-
- XXXXmmmmCCCCaaaassssccccaaaaddddeeeeBBBBuuuuttttttttoooonnnn((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmCCCCaaaassssccccaaaaddddeeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))
-
-
-
- NNNNAAAAMMMMEEEE
- _X_m_C_a_s_c_a_d_e_B_u_t_t_o_n - The CascadeButton widget class
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- #include <Xm/CascadeB.h>
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- CascadeButton links two MenuPanes or a MenuBar to a
- MenuPane.
-
- It is used in menu systems and must have a RowColumn parent
- with its _X_m_N_r_o_w_C_o_l_u_m_n_T_y_p_e resource set to _X_m_M_E_N_U__B_A_R,
- _X_m_M_E_N_U__P_O_P_U_P or _X_m_M_E_N_U__P_U_L_L_D_O_W_N.
-
- It is the only widget that can have a Pulldown MenuPane
- attached to it as a submenu. The submenu is displayed when
- this widget is activated within a MenuBar, a PopupMenu, or a
- PulldownMenu. Its visuals can include a label or pixmap and
- a cascading indicator when it is in a Popup or Pulldown
- MenuPane; or, it can include only a label or a pixmap when
- it is in a MenuBar.
-
- The default behavior associated with a CascadeButton depends
- on the type of menu system in which it resides. By default,
- _B_S_e_l_e_c_t controls the behavior of the CascadeButton. In
- addition, _B_M_e_n_u controls the behavior of the CascadeButton
- if it resides in a Menu system. The actual mouse button
- used is determined by its RowColumn parent.
-
- A CascadeButton's visuals differ from most other button
- gadgets. When the button becomes armed, its visuals change
- from a 2-D to a 3-D look, and it displays the submenu that
- has been attached to it. If no submenu is attached, it
- simply changes its visuals.
-
- When a CascadeButton within a Pulldown or Popup MenuPane is
- armed as the result of the user moving the mouse pointer
- into the widget, it does not immediately display its
- submenu. Instead, it waits a short amount of time to see if
- the arming was temporary (that is, the user was simply
- passing through the widget), or whether the user really
- wanted the submenu posted. This time delay is configurable
- via _X_m_N_m_a_p_p_i_n_g_D_e_l_a_y.
-
- CascadeButton provides a single mechanism for activating the
- widget from the keyboard. This mechanism is referred to as
- a keyboard mnemonic. If a mnemonic has been specified for
- the widget, the user may activate the CascadeButton by
- simply typing the mnemonic while the CascadeButton is
- visible. If the CascadeButton is in a MenuBar and the
- MenuBar does not have the focus, the _M_A_l_t modifier must be
- pressed with the mnemonic. Mnemonics are typically used to
-
-
-
- Page 1 (printed 11/11/03)
-
-
-
-
-
-
- XXXXmmmmCCCCaaaassssccccaaaaddddeeeeBBBBuuuuttttttttoooonnnn((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmCCCCaaaassssccccaaaaddddeeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))
-
-
-
- interact with a menu via the keyboard interface.
-
- If in a Pulldown or Popup MenuPane and there is a submenu
- attached, the _X_m_N_m_a_r_g_i_n_B_o_t_t_o_m, _X_m_N_m_a_r_g_i_n_L_e_f_t,
- _X_m_N_m_a_r_g_i_n_R_i_g_h_t, and _X_m_N_m_a_r_g_i_n_T_o_p resources may enlarge to
- accommodate _X_m_N_c_a_s_c_a_d_e_P_i_x_m_a_p. _X_m_N_m_a_r_g_i_n_W_i_d_t_h defaults to 6
- if this resource is in a MenuBar; otherwise, it takes
- Label's default, which is 2.
-
- CCCCllllaaaasssssssseeeessss
- CascadeButton inherits behavior and resources from _C_o_r_e,
- _X_m_P_r_i_m_i_t_i_v_e, and _X_m_L_a_b_e_l classes.
-
- The class pointer is _x_m_C_a_s_c_a_d_e_B_u_t_t_o_n_W_i_d_g_e_t_C_l_a_s_s.
-
- The class name is _X_m_C_a_s_c_a_d_e_B_u_t_t_o_n.
-
- NNNNeeeewwww RRRReeeessssoooouuuurrrrcccceeeessss
- The following table defines a set of widget resources used
- by the programmer to specify data. The programmer can also
- set the resource values for the inherited classes to set
- attributes for this widget. To reference a resource by name
- or by class in a .Xdefaults file, remove the _X_m_N or _X_m_C
- prefix and use the remaining letters. To specify one of the
- defined values for a resource in a .Xdefaults file, remove
- the _X_m prefix and use the remaining letters (in either
- lowercase or uppercase, but include any underscores between
- words). The codes in the access column indicate if the
- given resource can be set at creation time (C), set by using
- _X_t_S_e_t_V_a_l_u_e_s (S), retrieved by using _X_t_G_e_t_V_a_l_u_e_s (G), or is
- not applicable (N/A).
-
- XXXXmmmmCCCCaaaassssccccaaaaddddeeeeBBBBuuuuttttttttoooonnnn RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt
- NNNNaaaammmmeeee CCCCllllaaaassssssss TTTTyyyyppppeeee DDDDeeeeffffaaaauuuulllltttt AAAAcccccccceeeessssssss
- __________________________________________________________________________
- XmNactivateCallback XmCCallback XtCallbackList NULL C
- XmNcascadePixmap XmCPixmap Pixmap dynamic CSG
- XmNcascadingCallback XmCCallback XtCallbackList NULL C
- XmNmappingDelay XmCMappingDelay int 180 ms CSG
- XmNsubMenuId XmCMenuWidget Widget NULL CSG
-
-
- _X_m_N_a_c_t_i_v_a_t_e_C_a_l_l_b_a_c_k
- Specifies the list of callbacks that is called when the
- user activates the CascadeButton widget, and there is
- no submenu attached to pop up. The activation occurs
- by releasing a mouse button or by typing the mnemonic
- associated with the widget. The specific mouse button
- depends on information in the RowColumn parent. The
- reason sent by the callback is _X_m_C_R__A_C_T_I_V_A_T_E.
-
- _X_m_N_c_a_s_c_a_d_e_P_i_x_m_a_p
-
-
-
- Page 2 (printed 11/11/03)
-
-
-
-
-
-
- XXXXmmmmCCCCaaaassssccccaaaaddddeeeeBBBBuuuuttttttttoooonnnn((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmCCCCaaaassssccccaaaaddddeeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))
-
-
-
- Specifies the cascade pixmap displayed on one end of
- the widget when a CascadeButton is used within a Popup
- or Pulldown MenuPane and a submenu is attached. The
- Label class resources _X_m_N_m_a_r_g_i_n_B_o_t_t_o_m, _X_m_N_m_a_r_g_i_n_L_e_f_t,
- _X_m_N_m_a_r_g_i_n_R_i_g_h_t, and _X_m_N_m_a_r_g_i_n_T_o_p may be modified to
- ensure that room is left for the cascade pixmap. The
- default cascade pixmap is an arrow pointing to the side
- of the menu where the submenu will appear.
-
- _X_m_N_c_a_s_c_a_d_i_n_g_C_a_l_l_b_a_c_k
- Specifies the list of callbacks that is called just
- prior to the mapping of the submenu associated with
- CascadeButton. The reason sent by the callback is
- _X_m_C_R__C_A_S_C_A_D_I_N_G.
-
- _X_m_N_m_a_p_p_i_n_g_D_e_l_a_y
- Specifies the amount of time, in milliseconds, between
- when a CascadeButton becomes armed and when it maps its
- submenu. This delay is used only when the widget is
- within a Popup or Pulldown MenuPane. The value must
- not be negative.
-
- _X_m_N_s_u_b_M_e_n_u_I_d
- Specifies the widget ID for the Pulldown MenuPane to be
- associated with this CascadeButton. The specified
- MenuPane is displayed when the CascadeButton becomes
- armed. The MenuPane must have been created with the
- appropriate parentage depending on the type of menu
- used. See _X_m_C_r_e_a_t_e_M_e_n_u_B_a_r(_3_X),
- _X_m_C_r_e_a_t_e_P_u_l_l_d_o_w_n_M_e_n_u(_3_X), and _X_m_C_r_e_a_t_e_P_o_p_u_p_M_e_n_u(_3_X) for
- more information on the menu systems.
-
- IIIInnnnhhhheeeerrrriiiitttteeeedddd RRRReeeessssoooouuuurrrrcccceeeessss
- CascadeButton inherits behavior and resources from the
- following superclasses. For a complete description of each
- resource, refer to the man page for that superclass.
-
- XXXXmmmmLLLLaaaabbbbeeeellll RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt
- NNNNaaaammmmeeee CCCCllllaaaassssssss TTTTyyyyppppeeee DDDDeeeeffffaaaauuuulllltttt AAAAcccccccceeeessssssss
- ___________________________________________________________________________________________________________
- XmNaccelerator XmCAccelerator String NULL N/A
- XmNacceleratorText XmCAcceleratorText XmString NULL N/A
- XmNalignment XmCAlignment unsigned char dynamic CSG
- XmNfontList XmCFontList XmFontList dynamic CSG
- XmNlabelInsensitivePixmap XmCLabelInsensitivePixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
- XmNlabelPixmap XmCLabelPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
- XmNlabelString XmCXmString XmString dynamic CSG
- XmNlabelType XmCLabelType unsigned char XmSTRING CSG
- XmNmarginBottom XmCMarginBottom Dimension dynamic CSG
- XmNmarginHeight XmCMarginHeight Dimension 2 CSG
-
-
-
-
-
- Page 3 (printed 11/11/03)
-
-
-
-
-
-
- XXXXmmmmCCCCaaaassssccccaaaaddddeeeeBBBBuuuuttttttttoooonnnn((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmCCCCaaaassssccccaaaaddddeeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))
-
-
-
- XmNmarginLeft XmCMarginLeft Dimension 0 CSG
- XmNmarginRight XmCMarginRight Dimension dynamic CSG
- XmNmarginTop XmCMarginTop Dimension dynamic CSG
- XmNmarginWidth XmCMarginWidth Dimension dynamic CSG
- XmNmnemonic XmCMnemonic KeySym NULL CSG
- XmNmnemonicCharSet XmCMnemonicCharSet String XmFONTLIST_DEFAULT_TAG CSG
- XmNrecomputeSize XmCRecomputeSize Boolean True CSG
- XmNstringDirection XmCStringDirection XmStringDirection dynamic CSG
-
-
- XXXXmmmmPPPPrrrriiiimmmmiiiittttiiiivvvveeee RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt
- NNNNaaaammmmeeee CCCCllllaaaassssssss TTTTyyyyppppeeee DDDDeeeeffffaaaauuuulllltttt AAAAcccccccceeeessssssss
- ________________________________________________________________________________________________
- XmNbottomShadowColor XmCBottomShadowColor Pixel dynamic CSG
- XmNbottomShadowPixmap XmCBottomShadowPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
- XmNforeground XmCForeground Pixel dynamic CSG
- XmNhelpCallback XmCCallback XtCallbackList NULL C
- XmNhighlightColor XmCHighlightColor Pixel dynamic CSG
- XmNhighlightOnEnter XmCHighlightOnEnter Boolean False CSG
- XmNhighlightPixmap XmCHighlightPixmap Pixmap dynamic CSG
- XmNhighlightThickness XmCHighlightThickness Dimension 0 CSG
- XmNnavigationType XmCNavigationType XmNavigationType XmNONE CSG
- XmNshadowThickness XmCShadowThickness Dimension 2 CSG
- XmNtopShadowColor XmCTopShadowColor Pixel dynamic CSG
- XmNtopShadowPixmap XmCTopShadowPixmap Pixmap dynamic CSG
- XmNtraversalOn XmCTraversalOn Boolean dynamic G
- XmNunitType XmCUnitType unsigned char dynamic CSG
- XmNuserData XmCUserData XtPointer NULL CSG
-
-
- CCCCoooorrrreeee RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt
- NNNNaaaammmmeeee CCCCllllaaaassssssss TTTTyyyyppppeeee DDDDeeeeffffaaaauuuulllltttt AAAAcccccccceeeessssssss
- ______________________________________________________________________________________________________________
- XmNaccelerators XmCAccelerators XtAccelerators dynamic CSG
- XmNancestorSensitive XmCSensitive Boolean dynamic G
- XmNbackground XmCBackground Pixel dynamic CSG
- XmNbackgroundPixmap XmCPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
- XmNborderColor XmCBorderColor Pixel XtDefaultForeground CSG
- XmNborderPixmap XmCPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
- XmNborderWidth XmCBorderWidth Dimension 0 CSG
- XmNcolormap XmCColormap Colormap dynamic CG
- XmNdepth XmCDepth int dynamic CG
- XmNdestroyCallback XmCCallback XtCallbackList NULL C
- XmNheight XmCHeight Dimension dynamic CSG
- XmNinitialResourcesPersistent XmCInitialResourcesPersistent Boolean True C
- XmNmappedWhenManaged XmCMappedWhenManaged Boolean True CSG
- XmNscreen XmCScreen Screen * dynamic CG
- XmNsensitive XmCSensitive Boolean True CSG
- XmNtranslations XmCTranslations XtTranslations dynamic CSG
- XmNwidth XmCWidth Dimension dynamic CSG
-
-
-
-
-
- Page 4 (printed 11/11/03)
-
-
-
-
-
-
- XXXXmmmmCCCCaaaassssccccaaaaddddeeeeBBBBuuuuttttttttoooonnnn((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmCCCCaaaassssccccaaaaddddeeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))
-
-
-
- XmNx XmCPosition Position 0 CSG
- XmNy XmCPosition Position 0 CSG
-
-
- CCCCaaaallllllllbbbbaaaacccckkkk IIIInnnnffffoooorrrrmmmmaaaattttiiiioooonnnn
- A pointer to the following structure is passed to each
- callback:
- typedef struct
- {
- int rrrreeeeaaaassssoooonnnn;
- _X_E_v_e_n_t **** eeeevvvveeeennnntttt;
- } _X_m_A_n_y_C_a_l_l_b_a_c_k_S_t_r_u_c_t;
-
- rrrreeeeaaaassssoooonnnn
- Indicates why the callback was invoked.
-
- eeeevvvveeeennnntttt
- Points to the _X_E_v_e_n_t that triggered the callback or is
- NULL if this callback was not triggered due to an
- _X_E_v_e_n_t.
-
- TTTTrrrraaaannnnssssllllaaaattttiiiioooonnnnssss
- XmCascadeButton includes translations from Primitive.
- XmCascadeButton includes the menu traversal translations
- from XmLabel. These translations may not directly
- correspond to a translation table.
-
- Note that altering translations in #_o_v_e_r_r_i_d_e or #_a_u_g_m_e_n_t
- mode is undefined.
-
- The translations for a CascadeButton in a MenuBar are listed
- below. These translations may not directly correspond to a
- translation table.
- BSelect Press: MenuBarSelect()
- BSelect Release:DoSelect()
- KActivate: KeySelect()
- KSelect: KeySelect()
- KHelp: Help()
- MAny KCancel: CleanupMenuBar()
-
- The translations for a CascadeButton in a PullDown or Popup
- MenuPane are listed below. In a menu system, _B_M_e_n_u also
- performs the _B_S_e_l_e_c_t actions. These translations may not
- directly correspond to a translation table.
- BSelect Press: StartDrag()
- BSelect Release:DoSelect()
- KActivate: KeySelect()
- KSelect: KeySelect()
- KHelp: Help()
- MAny KCancel: CleanupMenuBar()
-
- AAAAccccttttiiiioooonnnn RRRRoooouuuuttttiiiinnnneeeessss
-
-
-
- PPPPaaaaggggeeee 5555 ((((pppprrrriiiinnnntttteeeedddd 11111111////11111111////00003333))))
-
-
-
-
-
-
- XXXXmmmmCCCCaaaassssccccaaaaddddeeeeBBBBuuuuttttttttoooonnnn((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmCCCCaaaassssccccaaaaddddeeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))
-
-
-
- The XmCascadeButton action routines are described below:
-
- _C_l_e_a_n_u_p_M_e_n_u_B_a_r():
- In a MenuBar, disarms the CascadeButton and the menu
- and, when the shell's keyboard focus policy is
- _X_m_E_X_P_L_I_C_T, restores keyboard focus to the widget that
- had the focus before the menu was entered.
-
- In a toplevel Pulldown MenuPane from a MenuBar, unposts the
- menu, disarms the MenuBar CascadeButton and the MenuBar,
- and, when the shell's keyboard focus policy is _X_m_E_X_P_L_I_C_T,
- restores keyboard focus to the widget that had the focus
- before the MenuBar was entered. In other Pulldown
- MenuPanes, unposts the menu.
-
- In a Popup MenuPane, unposts the menu and, when the shell's
- keyboard focus policy is _X_m_E_X_P_L_I_C_T, restores keyboard focus
- to the widget from which the menu was posted.
-
- _D_o_S_e_l_e_c_t():
- Calls the callbacks in _X_m_N_c_a_s_c_a_d_i_n_g_C_a_l_l_b_a_c_k, posts the
- submenu attached to the CascadeButton and enables
- keyboard traversal within the menu. If the
- CascadeButton does not have a submenu attached, calls
- the callbacks in _X_m_N_a_c_t_i_v_a_t_e_C_a_l_l_b_a_c_k, the CascadeButton
- is activated and all posted menus in the cascade are
- unposted.
-
- _H_e_l_p():
- Unposts all menus in the menu hierarchy and, when the
- shell's keyboard focus policy is _X_m_E_X_P_L_I_C_T, restores
- keyboard focus to the widget that had the focus before
- the menu system was entered. Calls the callbacks for
- _X_m_N_h_e_l_p_C_a_l_l_b_a_c_k if any exist. If there are no help
- callbacks for this widget, this action calls the help
- callbacks for the nearest ancestor that has them.
-
- _K_e_y_S_e_l_e_c_t():
- Calls the callbacks in _X_m_N_c_a_s_c_a_d_i_n_g_C_a_l_l_b_a_c_k, and posts
- the submenu attached to the CascadeButton if keyboard
- traversal is enabled in the menu. If the CascadeButton
- does not have a submenu attached, calls the callbacks
- in _X_m_N_a_c_t_i_v_a_t_e_C_a_l_l_b_a_c_k, the CascadeButton is activated
- and all posted menus in the cascade are unposted.
-
- _M_e_n_u_B_a_r_S_e_l_e_c_t():
- Unposts any menus posted by the parent menu. Arms both
- the CascadeButton and the MenuBar, posts the associated
- submenu, and enables mouse traversal. If the menu is
- already active, this event disables keyboard traversal
- for the menu and returns the menu to mouse traversal
- mode.
-
-
-
- Page 6 (printed 11/11/03)
-
-
-
-
-
-
- XXXXmmmmCCCCaaaassssccccaaaaddddeeeeBBBBuuuuttttttttoooonnnn((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmCCCCaaaassssccccaaaaddddeeeeBBBBuuuuttttttttoooonnnn((((3333XXXX))))
-
-
-
- _S_t_a_r_t_D_r_a_g():
- Arms the CascadeButton, posts the associated submenu,
- and enables mouse traversal. If the menu is already
- active, this event disables keyboard traversal for the
- menu and returns the menu to mouse traversal mode.
-
- AAAAddddddddiiiittttiiiioooonnnnaaaallll BBBBeeeehhhhaaaavvvviiiioooorrrr
- Posting a submenu calls the _X_m_N_c_a_s_c_a_d_i_n_g_C_a_l_l_b_a_c_k callbacks.
- This widget has the additional behavior described below:
-
- <_E_n_t_e_r_W_i_n_d_o_w>:
- If keyboard traversal is enabled does nothing.
- Otherwise, in a MenuBar that is armed, unposts any
- MenuPanes associated with another MenuBar entry, arms
- the CascadeButton, and posts the associated submenu.
- In other menus, arms the CascadeButton and posts the
- associated submenu after the delay specified by
- _X_m_N_m_a_p_p_i_n_g_D_e_l_a_y.
-
- <_L_e_a_v_e_W_i_n_d_o_w>:
- If keyboard traversal is enabled does nothing.
- Otherwise, in a MenuBar that is armed, disarms the
- CascadeButton if the submenu associated with the
- CascadeButton is not currently posted or if there is no
- submenu associated with the CascadeButton.
-
- In other menus, if the pointer moves anywhere except into a
- submenu associated with the CascadeButton, the CascadeButton
- is disarmed and its submenu is unposted.
-
- VVVViiiirrrrttttuuuuaaaallll BBBBiiiinnnnddddiiiinnnnggggssss
- The bindings for virtual keys are vendor specific. For
- information about bindings for virtual buttons and keys, see
- _V_i_r_t_u_a_l_B_i_n_d_i_n_g_s(_3_X).
-
- RRRREEEELLLLAAAATTTTEEEEDDDD IIIINNNNFFFFOOOORRRRMMMMAAAATTTTIIIIOOOONNNN
- _C_o_r_e(_3_X), _X_m_C_a_s_c_a_d_e_B_u_t_t_o_n_H_i_g_h_l_i_g_h_t(_3_X),
- _X_m_C_r_e_a_t_e_C_a_s_c_a_d_e_B_u_t_t_o_n(_3_X),_X_m_C_r_e_a_t_e_M_e_n_u_B_a_r(_3_X),
- _X_m_C_r_e_a_t_e_P_u_l_l_d_o_w_n_M_e_n_u(_3_X), _X_m_C_r_e_a_t_e_P_o_p_u_p_M_e_n_u(_3_X),
- _X_m_D_i_s_p_l_a_y(_3_X), _X_m_L_a_b_e_l(_3_X), _X_m_P_r_i_m_i_t_i_v_e(_3_X), and
- _X_m_R_o_w_C_o_l_u_m_n(_3_X).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 7 (printed 11/11/03)
-
-
-
-